<template>
  <MainLayout title="页面标题">
    <view class="p-12">
      <view class="title">{{ info?.name || '-' }}</view>
      <view class="blk">项目编号：{{ info?.code || '-' }}</view>
      <view class="blk">项目地址：{{ info?.address || '-' }}</view>
      <view class="blk">人员数量：{{ info?.peopleCount ?? '-' }}</view>
    </view>
  </MainLayout>
</template>


<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { api } from '@/services/api'
import MainLayout from '@/layouts/MainLayout.vue'
const info = ref<any>(null)
onMounted(async ()=>{
  const id = (getCurrentPages().pop() as any)?.options?.id
  info.value = await api.getProject(id).catch(()=>({}))
})
</script>

<style scoped>
.p-12{padding:12px}
.title{font-size:18px;font-weight:700;margin-bottom:10px}
.blk{background:#fff;border-radius:8px;padding:10px;margin-bottom:8px}
</style>
